﻿using System.Collections;
using System.Collections.Generic;
using System.Net.NetworkInformation;
using UnityEngine;

namespace Nirvana
{
    public static class NetworkInfo
    {
        public static string GetMacAddress()
        {
            NetworkInterface[] allNetworkInterfaces = NetworkInterface.GetAllNetworkInterfaces();
            foreach (NetworkInterface networkInterface in allNetworkInterfaces)
            {
                PhysicalAddress physicalAddress = networkInterface.GetPhysicalAddress();
                string text = physicalAddress.ToString();
                if (!string.IsNullOrEmpty(text))
                {
                    return text;
                }
            }
            return string.Empty;
        }

    }
}

